package cz.kfad.ofrss.db;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;

public class DevelopmentDatabaseHelper extends AbstractDatabaseHelper {

    public DevelopmentDatabaseHelper(Context context) {
        super(context);
    }

    public void removeAllRssFeed() {
        doWithWritableDatabase(new ActionWithDatabase() {
            @Override
            public void doAction(SQLiteDatabase database) {
                database.execSQL("DELETE FROM " + DbConstants.TABLE_RSS_FEED);
            }
        });
    }

    public void removeAllChannels() {
        doWithWritableDatabase(new ActionWithDatabase() {
            @Override
            public void doAction(SQLiteDatabase database) {
                database.execSQL("DELETE FROM " + DbConstants.TABLE_CHANNEL);
            }
        });
    }

    public void removeAllCategories() {
        doWithWritableDatabase(new ActionWithDatabase() {
            @Override
            public void doAction(SQLiteDatabase database) {
                database.execSQL("DELETE FROM " + DbConstants.TABLE_CATEGORY);
            }
        });
    }
}
